import numpy as np


class levitationSys:
    def __init__(self, ncount, x10, x20, y10, y20):
        self.x10 = x10
        self.x20 = x20
        self.X1 = np.zeros(ncount)

        self.y10 = y10
        self.y20 = y20
        self.Y1 = np.zeros(ncount)
        self.Y2 = np.zeros(ncount)

    def system_io(self, i, input, h, f):
 
        y1 = self.y10 + h * self.y20
        y2 = self.y20 + h * (-4900 * self.y10 + 3.1877 * input)
        self.Y1[i] = self.y10
        self.Y2[i] = self.y20

        self.y10 = y1
        self.y20 = y2

        return y1

